package com.smart.campus.school.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.ClassTeacherRelationMapper;
import com.smart.campus.school.domain.ClassTeacherRelation;
import com.smart.campus.school.service.IClassTeacherRelationService;
import com.smart.campus.common.core.text.Convert;

/**
 * 班级老师关系Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2020-11-24
 */
@Service
public class ClassTeacherRelationServiceImpl implements IClassTeacherRelationService 
{
    @Autowired
    private ClassTeacherRelationMapper classTeacherRelationMapper;

    /**
     * 查询班级老师关系
     * 
     * @param id 班级老师关系ID
     * @return 班级老师关系
     */
    @Override
    public ClassTeacherRelation selectClassTeacherRelationById(Long id)
    {
        return classTeacherRelationMapper.selectClassTeacherRelationById(id);
    }

    /**
     * 查询班级老师关系列表
     * 
     * @param classTeacherRelation 班级老师关系
     * @return 班级老师关系
     */
    @Override
    public List<ClassTeacherRelation> selectClassTeacherRelationList(ClassTeacherRelation classTeacherRelation)
    {
        return classTeacherRelationMapper.selectClassTeacherRelationList(classTeacherRelation);
    }

    /**
     * 新增班级老师关系
     * 
     * @param classTeacherRelation 班级老师关系
     * @return 结果
     */
    @Override
    public int insertClassTeacherRelation(ClassTeacherRelation classTeacherRelation)
    {
        return classTeacherRelationMapper.insertClassTeacherRelation(classTeacherRelation);
    }

    /**
     * 修改班级老师关系
     * 
     * @param classTeacherRelation 班级老师关系
     * @return 结果
     */
    @Override
    public int updateClassTeacherRelation(ClassTeacherRelation classTeacherRelation)
    {
        return classTeacherRelationMapper.updateClassTeacherRelation(classTeacherRelation);
    }

    /**
     * 删除班级老师关系对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteClassTeacherRelationByIds(String ids)
    {
        return classTeacherRelationMapper.deleteClassTeacherRelationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除班级老师关系信息
     * 
     * @param id 班级老师关系ID
     * @return 结果
     */
    @Override
    public int deleteClassTeacherRelationById(Long id)
    {
        return classTeacherRelationMapper.deleteClassTeacherRelationById(id);
    }
}
